package com.example.nbshangpping.utils;

import android.content.Context;

import java.io.File;

public class URLUtils {
    //内网公共部分
//    public static String PUBLIC_URL = "http://192.168.13.34:8080/beikeMarket";
    //外网公共部分
    public static String PUBLIC_URL = "http://47.100.26.130:8085/beikeMarket";

    //    用户相关接口
    // 1.注册接口
    public static String register_url = PUBLIC_URL+"/user/register";
    //2. 登录接口
    public static String login_url = PUBLIC_URL+"/user/login";
    //3. 更新/完善个人信息
    public static String updateinfo_url = PUBLIC_URL+"/user/updateInfo";
    //4. 显示密保问题
    public static String showQuestion_url = PUBLIC_URL+"/user/showQuestion";
    //5. 验证密保答案
    public static String verifyAnswer_url = PUBLIC_URL+"/user/verifyAnswer";
    //6. 修改密码
    public static String updatePwd_url = PUBLIC_URL+"/user/updatePwd";

    // 业务相关
    //    1.查询所有的分类
    public static String queryAllCategory_url = PUBLIC_URL+"/biz/queryAllCategory";
    //     2.通过分类查询对应的产品
    public static String queryCommodityByCateId_url = PUBLIC_URL+"/biz/queryCommodityByCateId?categoryId=";
    //     3.商品模糊查询
    public static String queryCommodityByName_url = PUBLIC_URL+"/biz/queryCommodityByName?name=";
    //    4.商品详情
    public static String queryCommodityInfo_url = PUBLIC_URL+"/biz/queryCommodityInfo?commodityId=";
    //    5.热销产品
    public static String hotCommodity_url = PUBLIC_URL+"/biz/hotCommodity";
    //    6 产品推荐
    public static String recommendCommodity_url = PUBLIC_URL+"/biz/recommendCommodity";
    //    7 猜你喜欢
    public static String guessYouLike_url = PUBLIC_URL+"/biz/guessYouLike";

    //购物车相关  post
    public static String insertShoppingCar_url = PUBLIC_URL+"/trade/insertShoppingCar";
    //直接购买相关  post
    public static String insertBought_url = PUBLIC_URL+"/trade/insertBought";
//    查询购物车   get
public static String queryShoppingCar_url = PUBLIC_URL+"/trade/queryShoppingCar?userId=";
//    查询已购买商品   get
public static String querybougth_url = PUBLIC_URL+"/trade/querybougth?userId=";
    //购物车购买
    public static String orderShopping_url=PUBLIC_URL+"/trade/orderShopping";

    public static String getImgPath(Context context, String name) {
        String path = context.getExternalCacheDir() +
                File.separator + name + ".jpg";
        return path;
    }

}